function  header() {
    var functionDiv = document.querySelector(".function");
    function onResult(result) {
        if(result.logged==1){
            functionDiv.innerHTML=
                `<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0"
       background="img/3.gif" bgcolor="#093887" class="top">
    <tr>
        <td width="1004" height="38" align="center" valign="middle">
            <table border="0" cellpadding="0" cellspacing="0" id="sddm">
                <tr>

                        <td align="left">

                                <table width="100" border="0" cellpadding="0" cellspacing="0"
                                       background="img/2.gif">
                                    <tr>
                                        <td height="38" align="center">
                                            <a href="/发布求职信息.html" class="left">发布求职信息</a>
                                        </td>
                                    </tr>
                                </table>

                            <!--导航 -->
                        </td>
                        <td align="left">

                                <table width="100" border="0" cellpadding="0" cellspacing="0"
                                       background="img/2.gif">
                                    <tr>
                                        <td height="38" align="center">
                                            <a href="/MyPost.html" class="left">我的求职信息</a>
                                        </td>
                                    </tr>
                                </table>

                            <!--导航 -->
                        </td>
                    <td align="left">

                            <table width="100" border="0" cellpadding="0" cellspacing="0"
                                   background="img/2.gif">
                                <tr>
                                    <td height="38" align="center">
                                        <a href="/submit" class="left">注销</a>
                                    </td>
                                </tr>
                            </table>

                        <!--导航 -->
                    </td>`
        }
        if(result.logged==2){
            functionDiv.innerHTML=
                `<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0"
       background="img/3.gif" bgcolor="#093887" class="top">
    <tr>
        <td width="1004" height="38" align="center" valign="middle">
            <table border="0" cellpadding="0" cellspacing="0" id="sddm">
                <tr>

                        <td align="left">

                                <table width="100" border="0" cellpadding="0" cellspacing="0"
                                       background="img/2.gif">
                                    <tr>
                                        <td height="38" align="center">
                                            <a href="/发布招聘信息.html" class="left">发布招聘信息</a>
                                        </td>
                                    </tr>
                                </table>

                            <!--导航 -->
                        </td>
                        <td align="left">

                                <table width="100" border="0" cellpadding="0" cellspacing="0"
                                       background="img/2.gif">
                                    <tr>
                                        <td height="38" align="center">
                                            <a href="/CompanyPost.html" class="left">我的招聘信息</a>
                                        </td>
                                    </tr>
                                </table>

                            <!--导航 -->
                        </td>
                    <td align="left">

                            <table width="100" border="0" cellpadding="0" cellspacing="0"
                                   background="img/2.gif">
                                <tr>
                                    <td height="38" align="center">
                                        <a href="/submit" class="left">注销</a>
                                    </td>
                                </tr>
                            </table>

                        <!--导航 -->
                    </td>`
        }
        if(result.logged==3){
            functionDiv.innerHTML=
                `<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0"
       background="img/3.gif" bgcolor="#093887" class="top">
    <tr>
        <td width="1004" height="38" align="center" valign="middle">
            <table border="0" cellpadding="0" cellspacing="0" id="sddm">
                <tr>

                        <td align="left">

                                <table width="100" border="0" cellpadding="0" cellspacing="0"
                                       background="img/2.gif">
                                    <tr>
                                        <td height="38" align="center">
                                            <a href="/guanli.html" class="left">管理中心</a>
                                        </td>
                                    </tr>
                                </table>

                            <!--导航 -->
                        </td>
                        <td align="left">

                                <table width="100" border="0" cellpadding="0" cellspacing="0"
                                       background="img/2.gif">
                                    <tr>
                                        <td height="38" align="center">
                                            <a href="/release-news.html" class="left">发布新闻</a>
                                        </td>
                                    </tr>
                                </table>

                            <!--导航 -->
                        </td>
                    <td align="left">

                            <table width="100" border="0" cellpadding="0" cellspacing="0"
                                   background="img/2.gif">
                                <tr>
                                    <td height="38" align="center">
                                        <a href="/submit" class="left">注销</a>
                                    </td>
                                </tr>
                            </table>

                        <!--导航 -->
                    </td>`
        }
    }
    ajax("get","/api/current-user.json",onResult)
}